﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Quebec.Silverlight.AttachedProperties
{
    public static class PanelSeperation
    {
        public static readonly DependencyProperty SeperationProperty = DependencyProperty.RegisterAttached(
            "Seperation",
            typeof(string),
            typeof(PanelSeperation),
            new PropertyMetadata(null, new PropertyChangedCallback(OnSeperatorChanged))
        );

        private static void OnSeperatorChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            UIElement obj = sender as UIElement;

            if (obj == null)
            {
                return;
            }

            if (obj is StackPanel)
            {
                var stackPanel = (StackPanel)obj;
            }
        }

        public static void SetSeperation(UIElement obj, string value)
        {
            obj.SetValue(SeperationProperty, value);
        }

        public static string GetSeperation(UIElement obj)
        {
            return obj.GetValue(SeperationProperty) as string;
        }
    }
}
